package com.jxwifi.cloud.quickclean.app;


import android.content.Context;
import android.widget.TextView;

import com.idroid.utils.TextDrawable;
import com.jxwifi.cloud.quickclean.R;

/**
 * 状态信息
 */
public class StateUtils {

    //public static final String SYS="SYS";//系统派单,自己找的订单，不显示右上角图标
    //地址类型标识
    public static final String XIAO_QU = "xiaoqu";//小区 0
    public static final String XIE_ZI_LOU = "xiezilou";//写字楼 1
    public static final String XUE_XIAO = "xuexiao";//学校 2
    public static final String QI_TA = "qita";//其他 3

    public static final String YES = "Y";
    public static final String NO = "N";

    /**
     * 性别
     */
    public static final String SEX_M = "M";
    public static final String SEX_W = "W";

    /**
     * 保洁订单状态
     */
    public static final String DP_ING = "DP_ING";//派单中
    public static final String SER_START = "SER_START";//已派单
    public static final String SER_LEAVE = "SER_LEAVE";//已出发
    public static final String SER_ARRIVE = "SER_ARRIVE";//已到达
    public static final String SER_TIME_START = "SER_TIME_START";//已开始
    public static final String SER_TIME_STOP = "SER_TIME_STOP";//已暂停
    public static final String SER_TIME_START_RE = "SER_TIME_START_RE";//计时重新开始
    public static final String CANCEL = "CANCEL";//已取消
    public static final String OUT_TIME_CANCEL = "OUT_TIME_CANCEL";//已过期
    public static final String SER_FINISHED = "SER_FINISHED";//已完成(待支付)
    public static final String SER_END = "SER_END";//已完成(已支付)

    /**
     * 工具包订单状态
     */
    public static final String CT_REF = "CT_REF";//创建订单
    public static final String PG_PAY = "PG_PAY";//待付款
    public static final String TB_DELI = "TB_DELI";//待发货
    public static final String GTB_REC = "GTB_REC";//待收货

    //下面2个状态与保洁中的状态一样所以不写了，用上面的就行
    //public static final String SER_LEAVE="SER_LEAVE";//待确认收获
    //public static final String SER_ARRIVE="SER_ARRIVE";//已完成

    public static final String OVER_TIME = "OVER_TIME";//订单超时
    public static final String REF_APPLY = "REF_APPLY";//申请退款
    public static final String CNL_ORDER = "CNL_ORDER";//取消订单
    public static final String ADMIN_CNL_ORDER = "ADMIN_CNL_ORDER";//后台取消订单
    public static final String ADMIN_RHB_MADE = "ADMIN_RHB_MADE";//后台退款

    /**
     * 优惠卷使用状态
     */
    public static final String READY = "ready";//未使用
    public static final String USED = "used";//已使用

    /**
     * 确认订单中保洁员选择状态
     */
    public static final String SYS = "SYS";//系统派单
    public static final String APPOINT = "Appoint";//指定保洁员

    /**
     * 支付类型
     */
    public static final String ALIPAY = "0";//支付宝
    public static final String WEIXIN = "1";//微信
    public static final String BALANCE = "2";//余额
    //public static final String BLEND="3";//混合支付
    public static final String PAY_NULL = "400";//支付状态为空
    public static final String PAY_ZERO = "101";//支付尾款为0的时候赋值

    /**
     * 卡卷传参类型
     */
    public static final String PAY_COME = "pay_come";//订单详情
    public static final String MAIN_COME = "main_come";//订单详情


    /**
     * 开发环境
     */
    public static final String HOST_ON_LINE = "https://api.qcleaner.cn"; //线上正式环境 20200530

    /**
     * 支付结果返回类型
     */
    public static final String PAY_ALI = "ali";//支付宝
    public static final String PAY_WX = "wx";//微信

    /**
     * 订单详情标题
     */
    public static final String ORDER_DETAILS = "订单详情";
    public static final String ORDER_OVERDUE = "订单过期";
    public static final String ORDER_CANCEL = "订单取消";

    public static final String TRUE = "true";
    public static final String FALSE = "false";

    /**
     * 快洁宝-消费记录状态
     */
    public static final String ORDER_QT_OUT = "OUT";
    public static final String ORDER_QT_ORDER_IN = "ORDER_IN";

    /**
     * 余额状态类型NORMAL 正常, FROZEN 冻结,ABNORMAL 异常
     */
    public static final String NORMAL = "NORMAL"; //正常
    public static final String FROZEN = "FROZEN"; //冻结
    public static final String ABNORMAL = "ABNORMAL"; //异常

    // 微信分享
    public static final int WE_CHAT_SHARE = 0;
    // 微信登录
    public static final int WE_CHAT_LOGIN = 1;
    // QQ分享
    public static final int QQ_SHARE = 2;
    // QQ 登录
    public static final int QQ_LOGIN = 3;
    /**
     * 微信登录QQ登录所用到的ID
     */
    public static final String WX_APPID = "wx1092edba482069e7";
    public static final String SIGN_KEY = "wx3a48d77a3f65b623";
    public static final String WX_SECRET = "2c6c614293e4d9e7cee9b0efbb0a4f28";
    public static final String QQ_APPID = "1106694129";
    public static final String WX_TENCENT = "com.tencent.mm";
    public static final String WEIXIN_XIAOCHENGXU_ID = "gh_c94142c7732b"; //小程序原始id

    /**
     * 首页广告 转跳类型枚举
     */
    public static final String ADVERT_NATIVE = "native";//转跳原生
    public static final String ADVERT_URL = "url";//转跳到URL

    public static final String QUICK_RECHARGE = "购买记录";
    public static final String QUICK_CONSUMPTION = "消费记录";

    /**
     * 购买套餐时间类型
     */
    public static final String APPOINT_DATE = "appointDate";
    public static final String NONE = "none";

    /**
     * 首页跳转状态
     */
    public static final String DAILY_CLEANING = "日常保洁";
    public static final String CLEAN_WASTELAND = "开荒保洁";
    public static final String TOOL_KIT = "工具包";
    public static final String CLEANING_COIL = "清洁券";
    public static final String INVITATION = "invite";//邀请有礼
    public static final String RECOMMEND = "recommend";//推荐有礼


    /**
     * 工具包-确认订单--地址按钮类型
     */
    public static final String ADD_TO = "add_to";
    public static final String MODIFY = "modify";

    /**
     * 拼团类型
     */
    public static final String TD="TD";//清洁服务
    public static final String SN="SN";//工具包
    public static final String SR="SR";//套餐

    //地址显示类别处理
    public static void typeAddress(Context context, TextView mTv, String typecode) {
        if (XIAO_QU.equals(typecode)) {
            TextDrawable.drawable(context, mTv, R.mipmap.icon_address_type_quarters, 0);
        } else if (XIE_ZI_LOU.equals(typecode)) {
            TextDrawable.drawable(context, mTv, R.mipmap.icon_address_type_office, 0);
        } else if (XUE_XIAO.equals(typecode)) {
            TextDrawable.drawable(context, mTv, R.mipmap.icon_address_type_school, 0);
        } else if (QI_TA.equals(typecode)) {
            TextDrawable.drawable(context, mTv, R.mipmap.icon_address_type_other, 0);
        }
    }
    //首页默认位置的经纬度
    public static String AddLat = "";
    public static String AddLon = "";

    /**
     * 工具包订单状态方法
     */
    public static String KtOrderStarts(String type) {
        String TypeName = "";
        if (CT_REF.equals(type)) {
            TypeName = "创建订单";
        } else if (PG_PAY.equals(type)) {
            TypeName = "待付款";
        } else if (TB_DELI.equals(type)) {
            TypeName = "待发货";
        } else if (GTB_REC.equals(type)) {
            TypeName = "待收货";
        } else if (SER_LEAVE.equals(type)) {
            TypeName = "待确认收获";
        } else if (SER_ARRIVE.equals(type)) {
            TypeName = "已完成";
        } else if (OVER_TIME.equals(type)) {
            TypeName = "订单超时";
        } else if (REF_APPLY.equals(type)) {
            TypeName = "申请退款";
        } else if (CNL_ORDER.equals(type)) {
            TypeName = "已取消";
        } else if (ADMIN_CNL_ORDER.equals(type)) {
            TypeName = "后台取消订单";
        } else if (ADMIN_RHB_MADE.equals(type)) {
            TypeName = "后台退款";
        }
        return TypeName;
    }

    /**
     * 友盟页面埋点ID
     */
    //启动页面
    private static final String Umeng_WelcomeActivity = "WelcomeActivity";
    //首页
    private static final String Umeng_MainActivity = "MainActivity";
    //订单投诉
    private static final String Umeng_ComplaintActivity = "ComplaintActivity";
    //订单投诉详情
    private static final String Umeng_ComplaintDetailsActivity = "ComplaintDetailsActivity";
    //添加备注
    private static final String Umeng_AddRemarksActivity = "AddRemarksActivity";
    //我的保洁员
    private static final String Umeng_MyCleanerActivity = "MyCleanerActivity";
    //订单确认页面
    private static final String Umeng_ConfirmOrderActivity = "ConfirmOrderActivity";
    //添加地址
    private static final String Umeng_AddressActivity = "AddressActivity";
    //地址列表
    private static final String Umeng_AddressListActivity = "AddressListActivity";
    //设置手机号
    private static final String Umeng_SetPhoneActivity = "SetPhoneActivity";
    //设置昵称
    private static final String Umeng_SetNameActivity = "SetNameActivity";
    //用户协议
    private static final String Umeng_UserloginActivity = "UserloginActivity";
    //登录页面
    private static final String Umeng_LoginActivity = "LoginActivity";
    //个人中心
    private static final String Umeng_PersonalActivity = "PersonalActivity";
    //首页用户协议
    private static final String Umeng_MainUserActivity = "MainUserActivity";
    //价格说明
    private static final String Umeng_PriceExplainActivity = "PriceExplainActivity";
    //H5页面
    private static final String Umeng_WebViewsActivity = "WebViewsActivity";
    //地图选择
    private static final String Umeng_MapActivity = "MapActivity";
    //我的订单
    private static final String Umeng_MyOrderActivity = "MyOrderActivity";
    //订单详情
    private static final String Umeng_OrderDetailsActivity = "OrderDetailsActivity";
    //卡卷
    private static final String Umeng_CardRollActivity = "CardRollActivity";
    //保洁员位置
    private static final String Umeng_CleaningMapActivity = "CleaningMapActivity";
    //产品详情
    private static final String Umeng_ProductDetailsActivity = "ProductDetailsActivity";
    //关于我们
    private static final String Umeng_AboutWeActivity = "AboutWeActivity";
    //绑定手机号
    private static final String Umeng_BindPhoneActivity = "BindPhoneActivity";
    //阿里云消息推送
    private static final String Umeng_PopupPushActivity = "PopupPushActivity";
    //购买工具包
    private static final String Umeng_BuyToolKitActivity = "BuyToolKitActivity";
    //工具包确定页面
    private static final String Umeng_TKConfirmActivity = "TKConfirmActivity";
    //工具包详情
    private static final String Umeng_TKDetailsActivity = "TKDetailsActivity";
    //物流
    private static final String Umeng_LogisticsActivity = "LogisticsActivity";
    //申请退款
    private static final String Umeng_RefundActivity = "RefundActivity";
    //我的钱包
    private static final String Umeng_QuickTreasureActivity = "QuickTreasureActivity";
    //套餐购买
    private static final String Umeng_BuySetMealActivity = "BuySetMealActivity";
    //拼团首页
    private static final String Umeng_AssembleMainActivity = "AssembleMainActivity";


    public static final String[] UmengList = {Umeng_WelcomeActivity,Umeng_MainActivity,Umeng_ComplaintActivity, Umeng_ComplaintDetailsActivity, Umeng_AddRemarksActivity, Umeng_MyCleanerActivity, Umeng_ConfirmOrderActivity,
            Umeng_AddressActivity, Umeng_AddressListActivity, Umeng_SetPhoneActivity, Umeng_SetNameActivity, Umeng_UserloginActivity, Umeng_LoginActivity, Umeng_PersonalActivity,
            Umeng_MainUserActivity, Umeng_PriceExplainActivity, Umeng_WebViewsActivity, Umeng_MapActivity, Umeng_MyOrderActivity, Umeng_OrderDetailsActivity, Umeng_CardRollActivity,
            Umeng_CleaningMapActivity, Umeng_ProductDetailsActivity, Umeng_AboutWeActivity, Umeng_BindPhoneActivity, Umeng_PopupPushActivity, Umeng_BuyToolKitActivity, Umeng_TKConfirmActivity,
            Umeng_TKDetailsActivity, Umeng_LogisticsActivity, Umeng_RefundActivity, Umeng_QuickTreasureActivity, Umeng_BuySetMealActivity,Umeng_AssembleMainActivity};

}
